home *** CD-ROM | disk | FTP | other *** search
/ Painter Bear's Language Bridge — Italian / Bridge_ponte_itialian.iso / pc / xtras / -pmatic.dir / Internal_14_order form.ls < prev    next >
Encoding:
Text File  |  1999-09-22  |  2.4 KB  |  55 lines

  1. on mouseUp
  2.   global gMonoFont, gPropFont, gCanPrint
  3.   if gCanPrint = 0 then
  4.     alert("The PrintOMatic Xtra is not installed. Printing is disabled.")
  5.     exit
  6.   end if
  7.   set doc to new(xtra("PrintOMatic"))
  8.   if not objectp(doc) then
  9.     alert("There is no currently selected printer. Printing features are disabled.")
  10.   else
  11.     cursor(4)
  12.     setDocumentName(doc, "PrintOMatic Xtra Order Form")
  13.     setMargins(doc, rect(0, 0, 0, 0))
  14.     set h to the height of member "inkspots" * getPageWidth(doc) / the width of member "inkspots"
  15.     drawPicture(doc, member "inkspots", rect(0, getPageHeight(doc) - h, getPageWidth(doc), getPageHeight(doc)))
  16.     drawPicture(doc, member "logo", rect(12, 72, 160, 244))
  17.     newPage(doc)
  18.     newFrame(doc, rect(144, 72, 144 + the width of member "name&address", getPageHeight(doc)), 0)
  19.     setTextJust(doc, "center")
  20.     append(doc, member "ordertitle", 0)
  21.     set the itemDelimiter to ","
  22.     set y to integer(item 3 of getInsertionPoint(doc))
  23.     newFrame(doc, rect(144, y, 144 + the width of member "name&address", getPageHeight(doc)), 0)
  24.     setTextJust(doc, "left")
  25.     append(doc, member "orderIntro", 0)
  26.     setTextLineSpacing(doc, 16)
  27.     append(doc, member "name&address", 0)
  28.     set y to integer(item 3 of getInsertionPoint(doc))
  29.     newFrame(doc, rect(144, y, 144 + the width of member "name&address" - the width of member "priceCol", getPageHeight(doc)), 0)
  30.     setTextLineSpacing(doc, 11)
  31.     append(doc, member "productCol", 0)
  32.     set bottom to integer(item 3 of getInsertionPoint(doc))
  33.     newFrame(doc, rect(144 + the width of member "name&address" - the width of member "priceCol", y, 144 + the width of member "name&address", getPageHeight(doc)), 0)
  34.     setTextJust(doc, "right")
  35.     setTextLineSpacing(doc, 11)
  36.     append(doc, member "priceCol", 0)
  37.     newFrame(doc, rect(144, bottom, 144 + the width of member "name&address", getPageHeight(doc)), 0)
  38.     append(doc, member "ordertotal", 0)
  39.     set bottom to integer(item 3 of getInsertionPoint(doc))
  40.     setTextJust(doc, "left")
  41.     newFrame(doc, rect(144, bottom, 144 + the width of member "name&address", getPageHeight(doc)), 0)
  42.     append(doc, member "endinfo", 0)
  43.     cursor(-1)
  44.     if word 1 of the text of cast the castNum of sprite the clickOn = "Preview" then
  45.       printPreview(doc)
  46.     else
  47.       if doJobSetup(doc) = 1 then
  48.         updateStage()
  49.         print(doc)
  50.       end if
  51.     end if
  52.     set doc to 0
  53.   end if
  54. end
  55.